package com.smh.aiagent.tools;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;

@Slf4j
public class TerminateTool {

    @Tool(description = """  
            Terminate the interaction when the request is met OR if the assistant cannot proceed further with the task.  
            When you have finished all the tasks, call this tool to end the work.  
            """)
    public String doTerminate(@ToolParam(description = "The reason for terminating the interaction") String reason) {
        log.info("任务结束, 原因: {}", reason);
        return "任务结束";
    }
}
